﻿using System;
using System.Collections.Generic;
using Assets.Scripts.Net.Data.Model;

namespace Assets.Scripts.Net.Data.Reader
{
    public class HomeWorkInfoReader:NetInfoReaderBase
    {
        public HomeWorkInfoReader(List<object> list) : base(list)
        {
            if (list == null) return;
            List<HomeWorkInfo> infos = new List<HomeWorkInfo>();
            for (int i = 0; i < list.Count; i++)
            {
                HomeWorkInfo info = new HomeWorkInfo();
                Dictionary<string, object> dict = list[i] as Dictionary<string, object>;
                AutoSetValue<HomeWorkInfo>(dict, info);
                infos.Add(info);
            }
            AddInfoToFactory<List<HomeWorkInfo>>(infos);
        }
    }
}